#ifndef __MEDIA_TYPE_HELPER__
#define __MEDIA_TYPE_HELPER__

#include "stdafx.h"

enum MprMediaType
{
    MMT_Video = 0,
    MMT_Audio,
    MMT_Flash
};

enum { MprMediaHeadBytes = 32 };
typedef unsigned char MprMediaHead[MprMediaHeadBytes];

#define Guid_Mp3 MEDIASUBTYPE_MPEG1Audio
#define Guid_Mp4 MEDIASUBTYPE_m4v
#define Guid_Avi MEDIASUBTYPE_Avi

namespace TMeadiaTypeHelper
{
    bool IsMp3MediaHead(const MprMediaHead pHead);
    bool IsOggMediaHead(const MprMediaHead pHead);
    bool IsAviMediaHead(const MprMediaHead pHead);
    bool IsWebmMediaHead(const MprMediaHead pHead);
    bool IsMp4MediaHead(const MprMediaHead pHead);
    bool IsSwfMediaHead(const MprMediaHead pHead);

    bool GetMediaType(MprMediaHead head, MprMediaType &mt, GUID &Guid);
};

#endif // __MEDIA_TYPE_HELPER__